package com.xiongwei.test;

import java.util.HashSet;
import java.util.Random;
import java.util.Set;

/**
 * to do
 *
 * @author XiongWei
 * @date 2021/1/14
 */
public class testttt {

    public static void main(String[] args) {
        Long[] array = new Long[2000];
        Long expectedSum = 0L;
        Set<Long> set = new HashSet<>();
        for (int i = 0; i < array.length; i++) {
            array[i] = random();
            System.out.println(array[i]);
            expectedSum += array[i];
            set.add(array[i]);
        }
        System.out.println("-----------");
        System.out.println(set.size());
    }

    static Random random = new Random(0);

    static long random() {
        return random.nextInt(10000);
    }
}
